package com.ctshk.app.order.train.config;


import com.ctshk.app.order.train.interceptor.AuthorityInterceptorAdapter;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * <p>
 *  权限拦截配置类
 * </p>
 *
 * @author 李新科
 * @date 2021/5/14 14:32
 */
@Configuration
public class AuthorityInterceptorConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new AuthorityInterceptorAdapter())
                .addPathPatterns("/**");
        WebMvcConfigurer.super.addInterceptors(registry);
    }
}
